import { Component } from '@angular/core';
import {NzButtonComponent} from "ng-zorro-antd/button";
import {NzSpaceComponent, NzSpaceItemDirective} from "ng-zorro-antd/space";
import {NzTooltipDirective} from "ng-zorro-antd/tooltip";
import {EurekaService} from '../services/eureka.service';
import {NzMessageService} from 'ng-zorro-antd/message';

@Component({
  selector: 'app-eureka',
  standalone: true,
  imports: [
    NzButtonComponent,
    NzSpaceComponent,
    NzTooltipDirective,
    NzSpaceItemDirective
  ],
  templateUrl: './eureka.component.html',
  styleUrl: './eureka.component.css'
})
export class EurekaComponent {
  test1_loading= false;
  test2_loading= false;

  constructor(private eurekaService: EurekaService,private message: NzMessageService ) {}


  test1() {
    this.test1_loading = true
    this.eurekaService.test1().subscribe(res => {
      this.test1_loading = false
      this.message.success("调用成功：" + res)
    })
  }

  test2() {
    this.test2_loading = true
    this.eurekaService.test2().subscribe(res => {
      this.test2_loading = false
      this.message.success("调用成功：" + res)
    })
  }
}
